package com.iss.soc.exception;


import com.google.gson.Gson;
import retrofit2.Response;

/**
 * Created by admin on  2016/7/26.
 */
public class SocServiceException extends RuntimeException{
        private String status;
        private String msg;
        private String success = "false";
        private String bizcode;
        private ErrorMsg errorMsg;
        private Response response;
        private ErrorMsg body;
        public SocServiceException() {
            super();
        }
        public void setBody(ErrorMsg body) {
        this.body = body;
    }
        public void setBody(String msg) {
        this.msg = msg;
    }
        public void setResponse(Response response) {
        this.response = response;
    }
        public SocServiceException(ErrorMsg errorMsg) {
            this.errorMsg=errorMsg;
        }

        public SocServiceException(String body) {
            this.msg = body;
        }

        public String toString(ErrorMsg errorMsg){
            Gson gson=new Gson();
            String error= gson.toJson(errorMsg);
            return error;
        }

}
